/* card animation */
@property --gradient-angle {
  syntax: '<angle>';
  initial-value: 360deg;
  inherits: false;
}


.VPFeature,
.VPTeamMembersItem,
.CardAnimation {
  border: 1px solid transparent !important;
  position: relative !important;
  border-radius: 0 !important;
  border-radius: 12px !important;
  overflow: visible !important;

  &>* {
    position: relative;
    z-index: 10;
    background-color: unset !important;
  }

  &::after,
  &::before {
    content: '';
    display: inline-block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 12px;
  }

  &::after {
    transform: translate(-1px, -1px);
    z-index: 1;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    opacity: 0;
    transition: all 0.3s linear;
  }

  &.appear::after,
  &:hover::after {
    opacity: 1;
    animation: gradient-rotate 5s linear infinite reverse;
  }

  &::before {
    z-index: 2;
    background-color: var(--vp-c-bg-soft);
  }
}

.dark {

  .VPFeature,
  .VPTeamMembersItem,
  .CardAnimation {
    &::after {
      background: linear-gradient(1turn,
          hsla(0, 0%, 100%, 0.5),
          hsla(0, 0%, 100%, 0.1),
          #fff,
          hsla(0, 0%, 100%, 0.3)) !important;
      background: linear-gradient(var(--gradient-angle),
          rgba(96, 137, 241, 0.45),
          hsla(0, 0%, 100%, 0.1),
          #fff,
          rgba(66, 211, 146, 0.3)) !important;
    }
  }
}

.VPFeature,
.VPTeamMembersItem,
.CardAnimation {
  &::after {
    background: linear-gradient(1turn,
        rgba(66, 211, 146, 0.3),
        var(--vp-button-alt-border),
        rgba(96, 137, 241, 0.45),
        rgba(29, 224, 177, 0.3));
    background: linear-gradient(var(--gradient-angle),
        rgba(66, 211, 146, 0.3),
        var(--vp-button-alt-border),
        rgba(96, 137, 241, 0.45),
        rgba(29, 224, 177, 0.3));
  }
}

@media (prefers-reduced-motion: reduce) {

  .VPFeature,
  .VPTeamMembersItem,
  .CardAnimation {
    &::after {
      animation: none !important;
    }
  }
}

@keyframes gradient-rotate {
  from {
    --gradient-angle: 360deg;
  }

  to {
    --gradient-angle: 0deg;
  }
}